package day03;

public class LxDemo {
    public static void main(String[] args) {

        int a = 1 , b = 1 ;
        a = a++;
        int c = a++ ; // a + 1 = a 现在的a 2
        int d = ++b ; // b + 1 = 2
        System.out.println(a);// 2
        System.out.println(b);// 2
        System.out.println(c);// 1
        System.out.println(d);// 2

        int a1 = 1 , b1 = 1 ;
        int c1 = a1-- ; // a - 1 = 0
        int d1 = --b1 ; // b - 1 = 0
        System.out.println(a1); // 0
        System.out.println(b1); // 0
        System.out.println(c1); // 1
        System.out.println(d1); // 0

        int a2 = 1 , b2 = 1 ;
        System.out.println( a2 > b2 ); // false
        System.out.println( a2 < b2 ); // false
        System.out.println( a2 >= b2 ); // true
        System.out.println( a2 <= b2 ); // true
        System.out.println( a2 == b2 ); // true
        System.out.println( a2 != b2 ); // false

        System.out.println( a2 >= b2 && a2 <= b2 ); // true
        System.out.println( a2 >= b2 && a2 != b2 ); // false
        System.out.println( a2 >= b2 || a2 != b2 ); // true
        System.out.println( a2 > b2 || a2 != b2 ); // false

        int c2 = a2 + b2 ;
        boolean a3 = c2 >= a2 ;
        System.out.println( !a3 ); // false
        System.out.println( !( c2 <= a2 )); // true

        int aa = 1 ;
        aa += 1 ; // aa + 1 = aa = 2
        aa -= 1 ; // aa - 1 = aa = 1
        aa *= 2 ; // aa * 2 = aa = 2
        aa /= 2 ; // aa / 2 = aa = 1
        aa %= 1 ; // aa % 1 = aa = 0
        System.out.println( aa ); // 0

        int bb = 1 ;
        System.out.println( "快乐的池塘有"+ bb +"只小青蛙");
        System.out.println( 10 + 10 + 10 + "" + 10 + 10 + 10 ); // 30101010
        System.out.println( "" + 10 + 10 + 10 ); // 101010

        int cc = 1 ;
        int dd = cc >= 1 ? 1 : 2 ;
        System.out.println( dd ); // 1

        int aa1 = 5 , bb1 = 10 ;
        System.out.println( aa1 >= bb1 ? aa1 : bb1 );

        if ( aa1 >= 1 && aa1 <= 5 ){
            System.out.println( "输出成功" );
        } else {
            System.out.println( "输出失败" );
        }
    }
}
